<%- include include/header %>

      <%- include include/flash %>

      <% posts.forEach(function (post, index) { %>
        <div class="well well-sm">
          <h4><a href="/post/<%=post._id%>"><%= post.title %></a></h4>
          <!--
          <p><%- post.content %></p>
          -->
          <span class="label label-default"><%= post.userName %></span>
          <span class="label label-default"><%= post.time.minute  %></span>
          <% if (user && user.userName == post.userName) { %>
            <a href="/post/u/<%=post._id%>"><span class="label label-primary">Edit</span></a>
            <a href="/post/d/<%=post._id%>"><span class="label label-danger">Delete</span></a>
          <% } %>
        </div>
      <% }) %>

<%- include include/footer %>